﻿@{
    Layout = null;
}

<script src="~/Scripts/angular.min.js"></script>

<div ng-app="myApp" ng-controller="myCtrl">
    <p> 当前页面的url:</p>
    <h3>{{myUrl}}</h3>
</div>

<p>该实例使用了内建的 $location 服务获取当前页面的 URL。</p>

<script>
    var app = angular.module('myApp', []);
    //声明$location
    app.controller('myCtrl', function($scope, $location) {
        $scope.myUrl = $location.absUrl();
    });
</script>
